<template>
	<div>
		<swiper 
		:list="demo01_list" 
		:height="thisHeights" 
		auto loop :dots-position='directions'></swiper>
	</div>
</template>

<script>
	import { Swiper, SwiperItem } from 'vux'
	import Data from '@/server/server.js'

	export default {
		props: ['heights', 'direction'],
		components: {
			Swiper,
			SwiperItem
		},
		data () {
			return {
				thisHeights: this.heights + 'rem',
				demo01_list: [],
				directions: this.direction
			}
		},
		methods: {
			init () {
				const id = this.$route.query.Id;
				if(id) {
					Data.goodDetail.then((data) => {
						this.demo01_list = data.swiperList;
					})
				} else {
					Data.swiper.then(data => {
						this.demo01_list = data;
					})
				}

			},
		},
		mounted () {
			this.init()
		}
	}
</script>

<style>

</style>